<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 400px;
            height: 400px;
            border: 1px solid red;
        }

        p:nth-of-type(1) {
            width: 50px;
            height: 50px;
            background: blue;
            transition: 2s;
        }

        p:nth-of-type(2) {
            width: 50px;
            height: 50px;
            background: orangered;
            transition: 2s;
        }

        div:hover p:nth-of-type(1) {
            transform: scale(2) translateX(200px);
        }

        div:hover p:nth-of-type(2) {
            transform: translateX(200px) scale(2);
        }

        /* 动画的顺序会影响动画的结果 */
    </style>
</head>

<body>
    <div>
        <p></p>
        <p></p>
    </div>
</body>

</html>